package com.woniuxy.hrp.mapper;

import com.woniuxy.hrp.entity.Doctor;
import com.woniuxy.hrp.entity.Hospital;
import com.woniuxy.hrp.entity.Nat;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.FetchType;

import java.util.List;

@Mapper
public interface NatMapper {
    @Insert("insert into hrp_nat (reseration_id,hospital_id,fee) values (#{reservation.id},#{hospital.id},#{fee})")
    @Options(useGeneratedKeys = true, keyColumn = "id", keyProperty = "id")
    public  void insert(Nat nat);
    @Select("select * from hrp_nat where id=#{hospital.id}")
    @Results({
            @Result(column = "id", property = "id", id = true),
            @Result(column = "hospital_id", property = "hospital.id"),
            @Result(column = "fee", property = "fee"),
    })
    public  Nat seleByHosp(Hospital hospital);
    @Select("select * from hrp_nat ")
    @Results({
            @Result(column = "id", property = "id", id = true),
            @Result(column = "hospital_id", property = "hospital.id"),
            @Result(column = "fee", property = "fee"),
    })
    public List<Nat> seleAll();
}
